﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BOSS.Framework.Search.Result;
using BOSS.Framework.Search.Context;

namespace BOSS.Framework.Search
{
    /// <summary>
    /// 搜索器接口
    /// </summary>
    public interface ISearcher
    {
        /// <summary>
        /// 指示更新索引
        /// </summary>
        /// <param name="contentType"></param>
        /// <param name="actionType"></param>
        /// <param name="contentId"></param>
        /// <returns></returns>
        bool Indicate(string contentType, ActionType actionType, int contentId);

        /// <summary>
        /// 根据搜索上下文进行搜索
        /// </summary>
        /// <param name="context"></param>
        /// <param name="resultSchema"></param>
        /// <returns></returns>
        ISearchResult Search(ISearchContext context, string resultSchema);
    }
}
